home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / term / trms20e.lha / Floppy_Install < prev    next >
Text File  |  1995-01-28  |  20KB  |  471 lines

  1. (set vernum (getversion "libs:version.library"))
  2. (set ver (/ vernum 65536))
  3. (set rev (- vernum (* ver 65536)))
  4. (complete 0)
  5.  
  6. (set @default-dest "")
  7. (if (strlen (getassign "TERMINUS" "a"))
  8.    (
  9.       (set rem_flag
  10.          (askbool
  11.             (prompt
  12.                "The logical assignment \"TERMINUS\" is present, it must be unassigned "
  13.                "before the installation can continue."
  14.             )
  15.             (help 
  16.                "Select \"Remove\" to remove"
  17.                "this assignment or \"Abort\" to abort this script."
  18.             )
  19.             (default 1)
  20.             (choices "Remove" "Abort")
  21.          )
  22.       )
  23.       (if (= rem_flag 0)
  24.          (abort "User aborted installation.")
  25.          (run "Assign TERMINUS:")
  26.       )
  27.    )
  28. )
  29.  
  30. (message
  31.    "This floppy installation script is used to create or update an AmigaDOS 1.3, 2.0 "
  32.    "or 2.1 boot floppy and a Terminus program disk.\n\n"
  33.    "To do so you will need to boot from a copy of your Workbench disk (or your "
  34.    "boot floppy) before installation can continue.\n\n"
  35.    "The Terminus program disk will be created/updated first.  If updating, please "
  36.    "insert the Terminus program disk, which must be labled \"TERMINUS\" before proceeding."
  37. )
  38.  
  39. (set is_update 0)
  40. (set term-dest (getassign "TERMINUS" "v"))
  41.  
  42. (if (strlen term-dest)
  43.    (
  44.       (set is_update 
  45.          (askbool
  46.             (prompt 
  47.                "The volume \"TERMINUS:\" is present in \""
  48.                (getdevice term-dest)
  49.                ":\".\n\n  Do you want the update installed there?"
  50.             )
  51.             (help @askchoice-help)
  52.             (choices "Proceed" "Abort")
  53.             (default 1)
  54.          )
  55.       )
  56.       (if (= is_update 0)
  57.          (abort "User aborted installation.")
  58.       )
  59.    )
  60. )
  61.  
  62. (if (= is_update 0)
  63.    (
  64.       (until (getassign "TERMINUS" "v")
  65.          (
  66.             (message "Please insert a formatted, blank disk in drive DF0:")
  67.             (run "relabel drive DF0: TERMINUS")
  68.             (delete (tackon term-dest ".info") (optional "force"))
  69.             (message 
  70.                "The disk in DF0: has been relabeled as \"TERMINUS\".  Please "
  71.                "wait a few seconds for the drive activity LED to go out then "
  72.                "remove and finally reinsert the disk to update the system so "
  73.                "that the \"TERMINUS\" volume name is present.  Proceed once "
  74.                "the disk LED has extinguished."
  75.             )
  76.          )
  77.       )
  78.       (set term-dest (getassign "TERMINUS" "v"))
  79.    )
  80. )
  81.  
  82. (set @execute-dir (pathonly @icon))
  83. (makeassign "TERMINST" @execute-dir)
  84. (set script-dest (tackon term-dest "Scripts"))
  85.  
  86. (if (not (exists script-dest))
  87.    (makedir script-dest)
  88. )
  89.  
  90. (makeassign "TERMTEMP" script-dest)
  91. (working "Extracting Terminus scripts...")
  92. (set exec-lha (tackon "TERMINST:" "bin/lha -mxE e "))
  93. (set exec-part (tackon "TERMINST:" "ScriptFiles TERMTEMP:"))
  94. (run (cat exec-lha exec-part))
  95. (run "TERMINST:bin/touch TERMTEMP:Scripts/*")
  96.  
  97. (complete 10)
  98.  
  99. (makeassign "TERMTEMP" term-dest)
  100. (working "Extracting Terminus executable files...")
  101. (set exec-part (tackon "TERMINST:" "ExecFiles TERMTEMP:"))
  102. (run (cat exec-lha exec-part))
  103.  
  104. (complete 20)
  105.  
  106. (working "Extracting Terminus documentation files...")
  107. (set exec-part (tackon "TERMINST:" "DocFiles TERMTEMP:"))
  108. (run (cat exec-lha exec-part))
  109. (makeassign "TERMTEMP")
  110. (makeassign "TERMINST")
  111.  
  112. (if (exists "keyfile")
  113.    (copyfiles
  114.       (source "keyfile")
  115.       (dest "TERMINUS:")
  116.    )
  117. )
  118.  
  119. (complete 30)
  120.  
  121. (set make_boot 
  122.    (askchoice
  123.       (prompt 
  124.          "Please insert the boot disk to be created or updated in drive DF0: now.  Next, "
  125.          "select the appropriate choice from the list below.\n\n"
  126.          "If you are updating a boot disk you will need approximately 140k of free space "
  127.          "for the necessary fonts and libraries that will be copied to it."
  128.       )
  129.       (choices "Update" "AmigaDOS 1.3" "AmigaDOS 2.0" "AmigaDOS 2.1")
  130.       (default 0)
  131.       (help @askchoice-help)
  132.    )
  133. )
  134.          
  135. (set boot-dest "DF0:")
  136. (if (not (= make_boot 0))
  137.    (
  138.       (message
  139.          "The disk installed in DF0: is about to be modified.  All unneccesary files are going to "
  140.          "be deleted.  Are you certain that you want to continue with this installation?\n\n"
  141.          "CAUTION -- DO NOT USE YOUR ORIGINAL WORKBENCH DISK!"
  142.       )
  143.       (set n 0)
  144.       (if (= make_boot 1)
  145.          (
  146.             (while (set thisfile (select n "c/Ask" 
  147.                                              "c/DiskChange"
  148.                                              "c/DiskDoctor"
  149.                                              "c/Edit"
  150.                                              "c/Lock"
  151.                                              "c/Protect"
  152.                                              "c/Quit"
  153.                                              "c/RemRAD"
  154.                                              "c/Sort"
  155.                                              "c/Which"
  156.                                              "c/Why"
  157.                                              "System/FixFonts"
  158.                                              "System/FixFonts.info"
  159.                                              "System/InitPrinter"
  160.                                              "System/InitPrinter.info"
  161.                                              "System/MergeMem"
  162.                                              "System/MergeMem.info"
  163.                                              "System/NoFastMem"
  164.                                              "System/NoFastMem.info"
  165.                                              "Prefs/CopyPrefs"
  166.                                              "Prefs/CopyPrefs.info"
  167.                                              "Prefs/Pointer.info"
  168.                                              "Prefs/Serial.info"
  169.                                              "l/Aux-Handler"
  170.                                              "l/FastFileSystem"
  171.                                              "l/Pipe-Handler"
  172.                                              "l/Speak-Handler"
  173.                                              "devs/narrator.device"
  174.                                              "s/Startup-Sequence"
  175.                                              "s/Startup-Sequence.HD"
  176.                                              "s/StartupII"
  177.                                              "fonts/ruby/12"
  178.                                              "fonts/ruby/15"
  179.                                              "fonts/ruby/8"
  180.                                              "fonts/opal/12"
  181.                                              "fonts/opal/9"
  182.                                              "fonts/sapphire/14" 
  183.                                              "fonts/sapphire/19"
  184.                                              "fonts/diamond/12"
  185.                                              "fonts/diamond/20"
  186.                                              "fonts/garnet/16"
  187.                                              "fonts/garnet/9"
  188.                                              "fonts/emerald/17"
  189.                                              "fonts/emerald/20"
  190.                                              "fonts/diamond.font"
  191.                                              "fonts/emerald.font"
  192.                                              "fonts/garnet.font"
  193.                                              "fonts/opal.font"
  194.                                              "fonts/ruby.font"
  195.                                              "fonts/sapphire.font"
  196.                                              "fonts/diamond"
  197.                                              "fonts/emerald"
  198.                                              "fonts/garnet"
  199.                                              "fonts/opal"
  200.                                              "fonts/ruby"
  201.                                              "fonts/sapphire"
  202.                                              "libs/mathieeedoubbas.library"
  203.                                              "libs/mathieeedoubtrans.library"
  204.                                              "libs/mathtrans.library"
  205.                                              "libs/translator.library"
  206.                                              "Empty"
  207.                                              "Utilities/.info"
  208.                                              "Utilities/Calculator"
  209.                                              "Utilities/Calculator.info"
  210.                                              "Utilities/Clock"
  211.                                              "Utilities/Clock.info"
  212.                                              "Utilities/ClockPtr"
  213.                                              "Utilities/ClockPtr.info" 
  214.                                              "Utilities/CMD"
  215.                                              "Utilities/Cmd.info"
  216.                                              "Utilities/InstallPrinter"
  217.                                              "Utilities/InstallPrinter.info"
  218.                                              "Utilities/Notepad"
  219.                                              "Utilities/Notepad.info"
  220.                                              "Utilities/Say"
  221.                                              "Utilities/Say.info"
  222.                                              "Expansion"
  223.                                              "Empty.info"
  224.                                              "Expansion.info"
  225.                                              ""))
  226.                (
  227.                   (set n (+ n 1))
  228.                   (working "Deleting file: " thisfile)
  229.                   (delete (tackon boot-dest thisfile) (optional "force"))
  230.                )
  231.             )
  232.  
  233.             (working "Building Startup-sequence script file...")
  234.             (textfile
  235.                (dest (tackon boot-dest "s/startup-sequence"))
  236.                (append
  237.                   "echo \"Terminus 2.0 boot disk for Workbench 1.3\"\n"
  238.                   "version\n"
  239.                   "c:SetPatch >NIL: r\n"
  240.                   "Addbuffers df0: 10\n"
  241.                   "Binddrivers\n"
  242.                   "FF >NIL: -0\n"
  243.                   "Sys:System/FastMemFirst\n"
  244.                   "resident CLI L:Shell-Seg SYSTEM pure add\n"
  245.                   "mount newcon:\n"
  246.                   "makedir ram:t\n"
  247.                   "assign T: ram:t\n"
  248.                   "makedir ram:env\n"
  249.                   "assign ENV: ram:env\n"
  250.                   "makedir ram:clipboards\n"
  251.                   "assign CLIPS: ram:clipboards\n"
  252.                   "SYS:System/SetMap usa1\n"
  253.                   "path ram: c: s: sys:system sys:utilities add\n"
  254.                   "LoadWB\n"
  255.                   "EndCLI >NIL:\n"
  256.                )
  257.             )
  258.          )
  259.          (
  260.             (while (set thisfile (select n "Prefs/Pointer"
  261.                                              "Prefs/Pointer.info"
  262.                                              "Prefs/Serial"
  263.                                              "Prefs/Serial.info"
  264.                                              "Prefs/Font"
  265.                                              "Prefs/Font.info"
  266.                                              "Prefs/IControl"
  267.                                              "Prefs/IControl.info"
  268.                                              "Prefs/Input"
  269.                                              "Prefs/Input.info"
  270.                                              "Prefs/Overscan"
  271.                                              "Prefs/Overscan.info"
  272.                                              "Prefs/Palette"
  273.                                              "Prefs/Palette.info"
  274.                                              "Prefs/Printer"
  275.                                              "Prefs/Printer.info"
  276.                                              "Prefs/PrinterGfx"
  277.                                              "Prefs/PrinterGfx.info"
  278.                                              "Prefs/ScreenMode"
  279.                                              "Prefs/ScreenMode.info"
  280.                                              "Prefs/Time"
  281.                                              "Prefs/Time.info"
  282.                                              "Prefs/WBPattern"
  283.                                              "Prefs/WBPattern.info"
  284.                                              "Libs/bullet.library"
  285.                                              "Libs/mathieeedoubtrans.library"
  286.                                              "Libs/mathieeesingtrans.library"
  287.                                              "Libs/mathtrans.library"
  288.                                              "Expansion"
  289.                                              "System/Fountain"
  290.                                              "System/Fountain.info"
  291.                                              "System/FixFonts"
  292.                                              "System/FixFonts.info"
  293.                                              "System/NoFastMem"
  294.                                              "System/NoFastMem.info"
  295.                                              "Utilities/Clock"
  296.                                              "Utilities/Clock.info"
  297.                                              "Utilities/Display"
  298.                                              "Utilities/Display.info"
  299.                                              "Utilities/Exchange"
  300.                                              "Utilities/Exchange.info"
  301.                                              "Utilities/Say"
  302.                                              "Utilities/Say.info"
  303.                                              "L/aux-handler"
  304.                                              "L/speak-handler"
  305.                                              "S/HDBackup.config"
  306.                                              "S/PickMap"
  307.                                              "S/Startup-sequence"
  308.                                              "S/Startup-sequence.HD"
  309.                                              "C/DiskChange"
  310.                                              "C/DiskDoctor"
  311.                                              "C/Edit"
  312.                                              "C/Lock"
  313.                                              "C/MagTape"
  314.                                              "C/Protect"
  315.                                              "C/RemRAD"
  316.                                              "C/Sort"
  317.                                              "C/Which"
  318.                                              "Devs/postscript_init.ps"
  319.                                              "Devs/narrator.device"
  320.                                              "Devs/DOSDrivers/PIPE"
  321.                                              "Devs/DOSDriversPIPE.info"
  322.                                              "Devs/DOSDrivers"
  323.                                              "Expansion.info"
  324.                                              ""))
  325.                (
  326.                   (set n (+ n 1))
  327.                   (working "Deleting file: " thisfile)
  328.                   (delete (tackon boot-dest thisfile) (optional "force"))
  329.                )
  330.             )
  331.  
  332.             (working "Building Startup-sequence script file...")
  333.             (textfile
  334.                (dest (tackon boot-dest "s/startup-sequence"))
  335.                (if (= make_boot 2)
  336.                   (
  337.                      (append
  338.                         "c:setpatch >NIL:\n"
  339.                         "c:version >NIL:\n"
  340.                         "addbuffers >NIL: df0: 15\n"
  341.                         "Resident >NIL: C:Execute PURE ADD\n"
  342.                         "makedir ram:T ram:Clipboards ram:env ram:env/sys\n"
  343.                         "copy >NIL: ENVARC: ram:env all quiet noreq\n"
  344.                         "assign ENV: ram:env\n"
  345.                         "assign T: ram:t ;set up T: directory for scripts\n"
  346.                         "assign CLIPS: ram:clipboards\n"
  347.                         "assign REXX: s:\n"
  348.                         "if exists sys:Monitors\n"
  349.                         "    join >NIL: sys:monitors/~(#?.info) as t:mon-start\n"
  350.                         "    execute t:mon-start\n"
  351.                         "    delete >NIL: t:mon-start\n"
  352.                         "endif\n"
  353.                         "BindDrivers\n"
  354.                         "setenv Workbench $Workbench\n"
  355.                         "setenv Kickstart $Kickstart\n"
  356.                         "Echo \"Terminus 2.0 boot disk Kickstart $Kickstart, Workbench $Workbench\"\n"
  357.                         "version\n"
  358.                         "IPrefs\n"
  359.                         "conclip\n"
  360.                         "path ram: c: sys:utilities sys:rexxc sys:system s: sys:prefs sys:wbstartup add\n"
  361.                         "LoadWB\n"
  362.                         "EndCLI >NIL:\n"
  363.                      )
  364.                   )
  365.                   (
  366.                      (append
  367.                         "C:SetPatch QUIET\n"
  368.                         "Version >NIL:\n"
  369.                         "AddBuffers >NIL: DF0: 15\n"
  370.                         "FailAt 21\n"
  371.                         "MakeDir RAM:T RAM:Clipboards RAM:ENV RAM:ENV/Sys\n"
  372.                         "Copy >NIL: ENVARC: RAM:ENV ALL NOREQ\n"
  373.                         "Assign >NIL: ENV: RAM:ENV\n"
  374.                         "Assign >NIL: T: RAM:T\n"
  375.                         "Assign >NIL: CLIPS: RAM:Clipboards\n"
  376.                         "Assign >NIL: REXX: S:\n"
  377.                         "Assign >NIL: PRINTERS: DEVS:Printers\n"
  378.                         "Assign >NIL: KEYMAPS: DEVS:Keymaps\n"
  379.                         "Assign >NIL: LOCALE: SYS:Locale\n"
  380.                         "IF NOT EXISTS SYS:Fonts\n"
  381.                         "  Assign FONTS:\n"
  382.                         "EndIF\n"
  383.                         "BindDrivers\n"
  384.                         "IF EXISTS DEVS:Monitors\n"
  385.                         "  List >NIL: DEVS:Monitors/~(#?.info) TO T:M LFORMAT \"DEVS:Monitors/%s\"\n"
  386.                         "  Execute T:M\n"
  387.                         "  Delete >NIL: T:M\n"
  388.                         "EndIF\n"
  389.                         "SetEnv Workbench $Workbench\n"
  390.                         "SetEnv Kickstart $Kickstart\n"
  391.                         "UnSet Workbench\n"
  392.                         "UnSet Kickstart\n"
  393.                         "IPrefs\n"
  394.                         "Echo \"Terminus 2.0 boot disk Kickstart $Kickstart, Workbench $Workbench\"\n"
  395.                         "version\n"
  396.                         "ConClip\n"
  397.                         "Path >NIL: RAM: C: SYS:Utilities SYS:Rexxc SYS:System S: SYS:Prefs SYS:WBStartup add\n"
  398.                         "LoadWB\n"
  399.                         "EndCLI >NIL:\n"
  400.                      )
  401.                   )
  402.                )
  403.             )
  404.             (if (not (exists (tackon boot-dest "fonts")))
  405.                (
  406.                   (makedir (tackon boot-dest "fonts"))
  407.                   (run "Assign FONTS: DF0:fonts")
  408.                )
  409.             )
  410.          )
  411.       )
  412.    )
  413. )
  414.  
  415. (complete 50)
  416.  
  417. (copyfiles
  418.    (source "Fonts")
  419.    (dest (tackon boot-dest "fonts"))
  420.    (all)
  421. )
  422.  
  423. (complete 60)
  424.  
  425. (set ver 0)
  426. (if (exists (tackon boot-dest "libs/asl.library"))
  427.    (
  428.       (set vernum (getversion (tackon boot-dest "libs/asl.library")))
  429.       (set ver (/ vernum 65536))
  430.    )
  431. )
  432.  
  433. (if (and (not (exists (tackon boot-dest "libs/req.library"))) (< ver 38))
  434.    (copyfiles
  435.       (source "Libs/req.library")
  436.       (dest (tackon boot-dest "libs"))
  437.    )
  438. )
  439.  
  440. (complete 70)
  441.  
  442. (if (not (exists (tackon boot-dest "libs/OwnDevUnit.library")))
  443.    (copyfiles
  444.       (source "Libs/OwnDevUnit.library")
  445.       (dest (tackon boot-dest "libs"))
  446.    )
  447. )
  448.  
  449. (complete 80)
  450.  
  451. (if (not (exists (tackon boot-dest "libs/xprkermit.library")))
  452.    (copyfiles
  453.       (source "Libs/xprkermit.library")
  454.       (dest (tackon boot-dest "libs"))
  455.    )
  456. )
  457.  
  458. (complete 90)
  459.  
  460. (if (not (exists (tackon boot-dest "libs/xprbplus.library")))
  461.    (copyfiles
  462.       (source "Libs/xprbplus.library")
  463.       (dest (tackon boot-dest "libs"))
  464.    )
  465. )
  466.  
  467. (complete 100)
  468.  
  469. (exit)
  470.  
  471.